﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace CoffeeBar.Models
{
    public class LoaiMatHangModels
    {
        [Required]
        [StringLength(100, ErrorMessage = "The must be not Empty!")]
        [DataType(DataType.MultilineText)]
        [Display(Name = "Loại Hàng")]
        public string TenLoaiMatHang { get; set; }
    }
    public class LoaiMatHang
    {
        public class LoaiHang
        {
            public string maloaihang { get; set; }
            public string tenloaihang { get; set; }
            public LoaiHang()
            {
                maloaihang = "";
                tenloaihang = "";
            }
        }
        public List<LoaiHang> items_LoaiHang { get; set; }
        public LoaiMatHang()
        {
            items_LoaiHang = null;
        }
        
    }
    public class MatHangModels
    {
        [Required]
        [Display(Name = "Mã Hàng")]
        public string MaHang { get; set; }

        [Required]
        [Display(Name = "Ma Loại Hàng")]
        public int MaLoaiHang { get; set; }

        [Required]
        [Display(Name = "Tên Hàng")]
        public string TenHang { get; set; }

        [Required]
        [Display(Name = "Đơn Giá")]
        public int DonGia { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "Giới Thiệu")]
        public string GioiThieu { get; set; }

        [Required]
        [Display(Name="Có Sẵn")]
        public bool CoSan { get; set; }

        [Required]    
        [Display(Name = "Điểm Đánh Giá")]
        public int DiemDanhGia { get; set; }
    }
    public class HangBan
    {
        public int MaHang { get; set; }
        public int MaLoaihang {get;set;}
        public string TenHang {get;set;}
        public long DonGia { get;set; }
        public string GioiThieu{get;set;}
        public int SanCo {get;set;}
        public int DiemDanhGia{get;set;}
        public HangBan()
        {
            TenHang = "";
            DonGia = 0;
            GioiThieu = "";            
            DiemDanhGia = 0;
        }
    }
}